<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <link rel="icon" type="image/svg+xml" href="../../../assets/favicon.ico" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Basic Video Call -- Agora</title>
  <link rel="stylesheet" href="../../../assets/bootstrap.min.css">
  <link rel="stylesheet" href="../../../common/common.css">
</head>

<body>
  <div class="container">
    <!-- left -->
    <section class="left">
    </section>
    <!-- right -->
    <section class="right row">
      <!-- video -->
      <div class="video-group col-md-12 col-lg-6">
        <!-- local stream -->
        <section class="card">
          <div class="card-header">
            local stream
          </div>
          <div class="card-body">
            <div id="local-player" class="player">
              <div class="card-text local-player-name" id="local-player-name"></div>
            </div>
          </div>
        </section>
        <!-- remote stream -->
        <section class="card">
          <div class="card-header">
            remote stream
          </div>
          <div class="card-body">
            <div id="remote-playerlist"></div>
          </div>
        </section>
      </div>
      <!-- form -->
      <div class="form-wrapper col-lg-6">
        <form id="join-form" name="join-form">
          <div class="join-info-group">
            <div class="form-item">
              <label class="form-label">Channel</label>
              <input class="form-control" id="channel" type="text" placeholder="enter channel name" required>
              <div class="tips">If you don`t know what is your channel, checkout <a
                  href="https://docs.agora.io/en/Agora%20Platform/terms?platform=All%20Platforms#channel">this</a>
              </div>
            </div>
            <div class="form-item">
              <label class="form-label">User ID(optional)</label>
              <input class="form-control" id="uid" type="text" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"
                onafterpaste="this.value=this.value.replace(/[^0-9]/g,'')" placeholder="Enter the user ID">
            </div>
          </div>
          <div class="button-group">
            <!-- Step1 -->
            <section class="step">
              <label class="form-label step-title"><span>Step1</span> Create AgoraRTC Client</label>
              <button type="button" id="step-create" class="btn btn-primary btn-sm">
                Create Client
              </button>
            </section>
            <!-- Step2 -->
            <section class="step">
              <label class="form-label step-title"><span>Step2</span> Join Channel</label>
              <button type="button" id="step-join" class="btn btn-primary btn-sm">
                Join Channel</button>
            </section>
            <!-- Step3 -->
            <section class="step">
              <label class="form-label step-title"><span>Step3</span> Create Track & Publish</label>
              <div class="form-check">
                <span class="form-check-label">Mirror Mode</span>
                <input class="form-check-input" type="checkbox" value="" id="mirror-check" checked disabled>
              </div>
              <button type="button" id="step-publish" class="btn btn-primary btn-sm">
                Create Track & Publish</button>
              <!-- audio -->
              <label class="form-label mt-2">Microphone</label>
              <select class="form-select mic-list">
                <option value="Default">Default</option>
              </select>
              <!-- video -->
              <label class="form-label mt-2">Camera</label>
              <select class="form-select cam-list">
                <option value="Default">Default</option>
              </select>
            </section>
            <!-- Step4 -->
            <section class="step">
              <label class="form-label step-title"><span>Step4</span> Subscribe & Play</label>
              <input class="form-control" type="text" id="remote-uid" placeholder="Please input remote userId"
                style="max-width: 300px;">
              <div class="mt-2 mb-2">
                <span class="form-check audio-check">
                  <input class="form-check-input" type="checkbox" value="" id="audio-check" checked>
                  <label class="form-check-label" for="audio-check">
                    Audio
                  </label>
                </span>
                <span class="form-check video-check">
                  <input class="form-check-input" type="checkbox" value="" id="video-check" checked>
                  <label class="form-check-label" for="video-check">
                    Video
                  </label>
                </span>
              </div>

              <button type="button" id="step-subscribe" class="btn btn-primary btn-sm">
                Subscribe & Play</button>
            </section>
            <!-- Step5 -->
            <section class="step">
              <label class="form-label step-title"><span>Step5</span> Leave Channel</label>
              <button type="button" id="step-leave" class="btn btn-danger btn-sm" disabled>
                Leave Channel</button>
            </section>
          </div>


        </form>
      </div>
      <!-- app info -->
      <div id="app-info"></div>
    </section>
  </div>


  <script src="../../../assets/jquery-3.4.1.min.js"></script>
  <script src="../../../assets/bootstrap.bundle.min.js"></script>
  <script src="../../../common/constant.js"></script>
  <script src="../../../sso/index.js"></script>
  <script src="../../../common/utils.js"></script>
  <script src="../../../common/left-menu.js"></script>
  <script src="../../../i18n/language.js"></script>
  <script src="https://download.agora.io/sdk/release/AgoraRTC_N.js"></script>
  <script src="./index.js"></script>
</body>

</html>
